/*
 * Copyright 2010 Michael Nitsche
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.mnit.basis.swt.vorlage;

import de.mnit.basis.sys.Ausgabe;
import de.mnit.basis.sys.event.A_HatZuhoerer;
import de.mnit.basis.sys.event.S_Zuhoerer;

/**
 * @author Michael Nitsche
 * 28.10.2008	Erstellt
 *
 * Hier laufen alle Events zusammen, die die gesamte Anwendung betreffen! (globale Events)
 */
public abstract class A_AnwZ_Events extends A_HatZuhoerer<A_AnwZ_Events> {

	public A_AnwZ_Events() {
		initEvents();
	}


	public void start(Enum<?> event) {
		Ausgabe.debug("Event start: "+event.name());
		this.zuhoererStart(event.name(), null);
	}

	public <T1> void start(Enum<?> event, T1 daten) {
		Ausgabe.debug("Event start: "+event.name());
		this.zuhoererStart(event.name(), daten);
	}

	public <T1> void plus(Enum<?> event, S_Zuhoerer<T1> zuhoerer) {
		Ausgabe.debug("Event plus: "+event.name());
		this.zuhoererPlus(event.name(), zuhoerer);
	}


//	public void start(AnwZ_EVENT<?> event) {
//		this.zuhoererStart(event.gName(), null);
//	}
//
//	public <T1> void start(AnwZ_EVENT<T1> event, T1 daten) {
//		this.zuhoererStart(event.gName(), daten);
//	}
//
//	public <T1> void plus(AnwZ_EVENT<T1> event, S_Zuhoerer<T1> zuhoerer) {
//		Ausgabe.debug(event.gName());
//		this.zuhoererPlus(event.gName(), zuhoerer);
//	}

	protected abstract void initEvents();

}
